import type { RouteRecordRaw } from 'vue-router'

const pages: RouteRecordRaw[] = [
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/views/home/index.vue'),
    meta: {
      title: '首页',
      iconKey: "Plus",
      size: "20px",
      affix: true
    }
  },
  {
    path: '/live',
    name: 'Live',
    redirect: '/live/index',
    meta: {
      title: '直播',
      iconKey: "VideoCameraFilled",
      size: "20px"
    },
    children: [
      {
        path: '/live/index',
        name: 'LiveIndex',
        component: () => import('@/views/live/index.vue'),
        meta: {
          title: '直播',
          iconKey: "VideoCameraFilled",
          size: "20px"
        }
      },
      {
        path: '/live/start',
        name: 'LiveStart',
        component: () => import('@/views/live/start/index.vue'),
        meta: {
          title: '开始直播',
          iconKey: "VideoPlay",
          size: "20px",
        }
      }
    ]
  },
  {
    path: '/room',
    name: 'Room',
    component: () => import('@/views/room/index.vue'),
    meta: {
      title: '房间',
      iconKey: "VideoCameraFilled",
      size: "20px"
    }
  },
  {
    path: '/system',
    name: 'System',
    redirect: '/system/user',
    meta: {
      title: '系统管理',
      iconKey: "VideoCameraFilled"
    },
    children: [
      {
        path: '/system/user',
        name: 'SystemUser',
        component: () => import('@/views/system/user/index.vue'),
        meta: {
          title: '用户管理',
          iconKey: "VideoCameraFilled",
          size: "20px",
          roles: ['admin']
        }
      },
      {
        path: '/system/role',
        name: 'SystemRole',
        component: () => import('@/views/system/role/index.vue'),
        meta: {
          title: '角色管理',
          iconKey: "VideoCameraFilled",
          size: "20px",
          roles: ['admin']
        }
      },
      {
        path: '/system/permission',
        name: 'SystemPermission',
        component: () => import('@/views/system/permission/index.vue'),
        meta: {
          title: '权限管理',
          iconKey: "VideoCameraFilled",
          size: "20px",
          roles: ['admin']
        }
      },
      {
        path: '/system/points',
        name: 'SystemPoints',
        component: () => import('@/views/system/points/index.vue'),
        meta: {
          title: '积分查看',
          iconKey: "VideoCameraFilled",
          size: "20px",
          roles: ['admin']
        }
      }
    ]
  },
  {
    path: '/ticket',
    name: 'Ticket',
    component: () => import('@/views/ticket/index.vue'),
    meta: {
      title: '工单管理',
      iconKey:"VideoCameraFilled",
      keepAlive: true,
      size: "20px"
    }
  },
  {
    path: '/storage',
    name: 'storage',
    component: () => import('@/views/file/index.vue'),
    meta: {
      title: '文件管理',
      iconKey: 'Folder'
    }
  }
]

export default pages